<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateMaterielPhoneTable extends Migration
{
  /**
   * Run the migrations.
   *
   * @return void
   */
  public function up()
  {
    Schema::create('materiel_phone', function (Blueprint $table) {
      $table->increments('id');
      $table->unsignedSmallInteger('member_id')->comment('用户ID');
      $table->unsignedSmallInteger('materiel_id')->comment('物料ID');
      $table->string('phone', 20)->comment('号码物料');
      $table->timestamps();
    });
  }

  /**
   * Reverse the migrations.
   *
   * @return void
   */
  public function down()
  {
    Schema::dropIfExists('materiel_phone');
  }
}
